package controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pojo.Dept;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 徒有琴
 */
@RestController
@RequestMapping("/rest")
public class RestTest2Controller {

    @RequestMapping("test1")
    public Dept test1() {
        return new Dept();
    }

    @RequestMapping("test2")
    public Map<String, Object> test2() {
        Map<String, Object> res = new HashMap<>();
        res.put("key1", 123);
        return res;
    }
}
